package de.android.data;

import java.util.*;

public class CreatePool {
	
	private Map<String,String> pool = null;
	private List<Integer> chosenRand = null;
	private Random rand = null;
	
	public CreatePool(){
		this.pool = new HashMap<String,String>();
		this.pool = new Readin().getMap();
		this.chosenRand = new LinkedList<Integer>();
		this.rand = new Random();
		
	}
	private boolean checkRandom(int rand){
		for(int i=0; i<chosenRand.size(); i++){
			if(chosenRand.get(i) == rand)
				return true;
			else
				return false;
		}
		return false;
	}
	public String returnQ(){
		if(!(checkRandom(getRand())))
			return pool.get(rand);
		return null;
	}
	private int getRand(){
		return rand.nextInt();
	}
}
